﻿//修改主题文字颜色
$("#DivColor").ColorPicker({
    onChange: function (hsb, hex, rgb) {
        $("#Color").val('#' + hex);
        $("#themeText").css("color", '#' + hex)
    }
});
//修改时间文字颜色
$("#Calendar").ColorPicker({
    onChange: function (hsb, hex, rgb) {
        $("#ThemeTime").val('#' + hex);
        $("#TimeColor").css("color", '#' + hex);
    }
})


//时时变更主题内容
function oninputfun(obj) {
    $("#themeText").html($(obj).val());
    $("#hidText").val($(obj).val());
};
//选择与修改主题图片
$("#layui-makImg ul").on("click","li",function () {
    var imgUrl = $(this).children(".layui-making-box").children(".layui-marketing-img").children("img").attr("src");
    makImg(imgUrl);
});
function makImg(imgUrl) {
    $("#themeBg").attr("src", imgUrl);
    $("#themeImg").attr("src", imgUrl);
    $("#bgUrl").val(imgUrl);
}
//选择与修改LOGO图片
$("#layui-makLogo ul").on("click", "li", function () {
    var logoUrl = $(this).children(".layui-making-box").children(".layui-marketing-img").children("img").attr("src");
    makLogo(logoUrl);
});
function makLogo(logoUrl) {
    $("#themeLogo").attr("src", logoUrl);
    $("#imgLogo").attr("src", logoUrl);
    $("#logoUrl").attr("src", logoUrl)
}